'use strict';
const unipay = require('uni-pay')
const unipayIns = unipay.initWeixin({
  appId: 'wxaa467a6dd16fa04b',
  mchId: '1499173942',
  key: 'e2d92b0105b08a68939eb8c04ad730f8',
  })
const {
  secret,
  getVersion,
  over,
  sm
} = require('orderinfo')
exports.main = async (event, context) => {
	let    orderInfo = await unipayIns.getOrderInfo({
	    openid: event.openid,
	    subject: event.subject, // 微信支付时不可填写此项
	    body: "熊猫代理",
	    outTradeNo: event.outTradeNo,
	    totalFee: event.totalFee, // 金额，单位分
	    notifyUrl: 'https://vips.xiongmaodaili.com/xiongmao-web/trade/wxNotify' // 支付结果通知地址
	})    
  return {
    orderInfo,
  }
}
